Skip to content

ci: create release pull requests with an app token so checks run - #731

Draft
zimeg wants to merge 4 commits into
mainfrom
ci-release-app-token
Draft

zimeg wants to merge 4 commits into
mainfrom
ci-release-app-token

Conversation

@zimeg

@zimeg zimeg commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

Summary

This pull request creates the release pull request with a GitHub App token, so its checks start without a maintainer approving each run, and keeps that token out of every job that runs npm.

  • The changelog job holds no write token now. It installs with npm ci --ignore-scripts, runs npm run version without pushing, and uploads what changed as a version.patch artifact. The version title from the "Decide next version" step reaches it as a job output. Its GITHUB_TOKEN drops to contents: read, and its checkout no longer persists credentials.
  • A new release-pr job runs no npm and no repository code, and it's the only job that mints the app token, scoped to this repository with contents and pull-requests write. It checks out with persist-credentials: false, downloads the patch, refuses it if it holds anything but regular files, and runs changesets/action with version-script: git apply …. The action commits the same changes and opens or updates the draft release pull request with the same title and body as before. With a version script set and no node_modules, it never loads repository code.
  • release-pr reads GH_APP_CLIENT_ID and GH_APP_PRIVATE_KEY from a new release-pr environment limited to main, with no required reviewers, so pushes to main don't wait on anyone and the publish environment stays as it is. The job runs only from main, so a dispatch from another branch no longer opens a release pull request for that branch. Release commits are now authored by the app instead of github-actions[bot].
  • Runs on a pull request from github-actions[bot] wait in action_required until a maintainer approves them: 12 of the last 30 runs on changeset-release/main waited.

The changelog job can no longer push, so npm run version has no token that could move the vX tags, which slackapi/slack-health-score#254 tracked. The same change is in slackapi/slack-health-score#259 so both actions release the same way.

Running the changelog steps against a test changeset and applying the patch to a clean checkout of the same commit gave an identical tree (checked in node-slack-sdk and manifest-schema), and a patch that adds a symlink fails the check. zizmor .github reports no new findings. This stays a draft until the release-pr environment and its secrets are saved.

Requirements

🤖 Generated with Claude Code

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg zimeg added this to the 4.1.1 milestone Dec 4, 2026
@zimeg zimeg added the github_actions Pull requests that update GitHub Actions code label Dec 4, 2026
@zimeg zimeg self-assigned this Dec 4, 2026
@changeset-bot

changeset-bot Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: bc1cb7c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov

codecov Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.86%. Comparing base (f2ee3d8) to head (bc1cb7c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #731   +/-   ##
=======================================
  Coverage   99.86%   99.86%           
=======================================
  Files           8        8           
  Lines         732      732           
=======================================
  Hits          731      731           
  Misses          1        1           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

zimeg and others added 3 commits December 4, 2026 13:33
# Conflicts:
#	.github/workflows/release.yml
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>

This branch was successfully deployed

1 active deployment
staging — bc1cb7cd Deployed Dec 4, 2026 by zimeg via Run CLI tests (ubuntu-latest) #432
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant